home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Fonts.h
-
- Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved.
-
- WARNING
- This file was auto generated by the interfacer tool. Modifications
- must be made to the master file.
-
- */
-
- #ifndef __FONTS__
- #define __FONTS__
-
- #ifndef __TYPES__
- #include <Types.h>
- /* #include <ConditionalMacros.h> */
- /* #include <MixedMode.h> */
- /* #include <Traps.h> */
- #endif
-
- enum {
- systemFont = 0,
- applFont = 1,
- newYork = 2,
- geneva = 3,
- monaco = 4,
- venice = 5,
- london = 6,
- athens = 7,
- sanFran = 8,
- toronto = 9,
- cairo = 11,
- losAngeles = 12,
- times = 20,
- helvetica = 21,
- courier = 22,
- symbol = 23,
- mobile = 24,
- commandMark = 17,
- checkMark = 18,
- diamondMark = 19
- };
-
- enum {
- appleMark = 20,
- propFont = 36864,
- prpFntH = 36865,
- prpFntW = 36866,
- prpFntHW = 36867,
- fixedFont = 45056,
- fxdFntH = 45057,
- fxdFntW = 45058,
- fxdFntHW = 45059,
- fontWid = 44208
- };
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct FMInput {
- short family;
- short size;
- Style face;
- Boolean needBits;
- short device;
- Point numer;
- Point denom;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct FMInput FMInput;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct FMOutput {
- short errNum;
- Handle fontHandle;
- unsigned char boldPixels;
- unsigned char italicPixels;
- unsigned char ulOffset;
- unsigned char ulShadow;
- unsigned char ulThick;
- unsigned char shadowPixels;
- char extra;
- unsigned char ascent;
- unsigned char descent;
- unsigned char widMax;
- char leading;
- char curStyle;
- Point numer;
- Point denom;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct FMOutput FMOutput;
-
- typedef FMOutput *FMOutPtr;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct FontRec {
- short fontType; /*font type*/
- short firstChar; /*ASCII code of first character*/
- short lastChar; /*ASCII code of last character*/
- short widMax; /*maximum character width*/
- short kernMax; /*negative of maximum character kern*/
- short nDescent; /*negative of descent*/
- short fRectWidth; /*width of font rectangle*/
- short fRectHeight; /*height of font rectangle*/
- unsigned short owTLoc; /*offset to offset/width table*/
- short ascent; /*ascent*/
- short descent; /*descent*/
- short leading; /*leading*/
- short rowWords; /*row width of bit image / 2 */
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct FontRec FontRec;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct FMetricRec {
- Fixed ascent; /*base line to top*/
- Fixed descent; /*base line to bottom*/
- Fixed leading; /*leading between lines*/
- Fixed widMax; /*maximum character width*/
- Handle wTabHandle; /*handle to font width table*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct FMetricRec FMetricRec;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct WidEntry {
- short widStyle; /*style entry applies to*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct WidEntry WidEntry;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct WidTable {
- short numWidths; /*number of entries - 1*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct WidTable WidTable;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct AsscEntry {
- short fontSize;
- short fontStyle;
- short fontID; /*font resource ID*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct AsscEntry AsscEntry;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct FontAssoc {
- short numAssoc; /*number of entries - 1*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct FontAssoc FontAssoc;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct StyleTable {
- short fontClass;
- long offset;
- long reserved;
- char indexes[48];
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct StyleTable StyleTable;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct NameTable {
- short stringCount;
- Str255 baseFontName;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct NameTable NameTable;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct KernPair {
- char kernFirst; /*1st character of kerned pair*/
- char kernSecond; /*2nd character of kerned pair*/
- short kernWidth; /*kerning in 1pt fixed format*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct KernPair KernPair;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct KernEntry {
- short kernLength; /*length of this entry*/
- short kernStyle; /*style the entry applies to*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct KernEntry KernEntry;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct KernTable {
- short numKerns; /*number of kerning entries*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct KernTable KernTable;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct WidthTable {
- Fixed tabData[256]; /*character widths*/
- Handle tabFont; /*font record used to build table*/
- long sExtra; /*space extra used for table*/
- long style; /*extra due to style*/
- short fID; /*font family ID*/
- short fSize; /*font size request*/
- short face; /*style (face) request*/
- short device; /*device requested*/
- Point inNumer; /*scale factors requested*/
- Point inDenom; /*scale factors requested*/
- short aFID; /*actual font family ID for table*/
- Handle fHand; /*family record used to build up table*/
- Boolean usedFam; /*used fixed point family widths*/
- unsigned char aFace; /*actual face produced*/
- short vOutput; /*vertical scale output value*/
- short hOutput; /*horizontal scale output value*/
- short vFactor; /*vertical scale output value*/
- short hFactor; /*horizontal scale output value*/
- short aSize; /*actual size of actual font used*/
- short tabSize; /*total size of table*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct WidthTable WidthTable;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct FamRec {
- short ffFlags; /*flags for family*/
- short ffFamID; /*family ID number*/
- short ffFirstChar; /*ASCII code of 1st character*/
- short ffLastChar; /*ASCII code of last character*/
- short ffAscent; /*maximum ascent for 1pt font*/
- short ffDescent; /*maximum descent for 1pt font*/
- short ffLeading; /*maximum leading for 1pt font*/
- short ffWidMax; /*maximum widMax for 1pt font*/
- long ffWTabOff; /*offset to width table*/
- long ffKernOff; /*offset to kerning table*/
- long ffStylOff; /*offset to style mapping table*/
- short ffProperty[9]; /*style property info*/
- short ffIntl[2]; /*for international use*/
- short ffVersion; /*version number*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct FamRec FamRec;
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- extern pascal void InitFonts(void)
- ONEWORDINLINE(0xA8FE);
- extern pascal void GetFontName(short familyID, Str255 name)
- ONEWORDINLINE(0xA8FF);
- extern pascal void GetFNum(ConstStr255Param name, short *familyID)
- ONEWORDINLINE(0xA900);
- extern pascal Boolean RealFont(short fontNum, short size)
- ONEWORDINLINE(0xA902);
- extern pascal void SetFontLock(Boolean lockFlag)
- ONEWORDINLINE(0xA903);
- extern pascal FMOutPtr FMSwapFont(const FMInput *inRec)
- ONEWORDINLINE(0xA901);
- extern pascal void SetFScaleDisable(Boolean fscaleDisable)
- ONEWORDINLINE(0xA834);
- extern pascal void FontMetrics(const FMetricRec *theMetrics)
- ONEWORDINLINE(0xA835);
- extern pascal void SetFractEnable(Boolean fractEnable);
- extern pascal Boolean IsOutline(Point numer, Point denom)
- TWOWORDINLINE(0x7000, 0xA854);
- extern pascal void SetOutlinePreferred(Boolean outlinePreferred)
- TWOWORDINLINE(0x7001, 0xA854);
- extern pascal Boolean GetOutlinePreferred(void)
- TWOWORDINLINE(0x7009, 0xA854);
- extern pascal OSErr OutlineMetrics(short byteCount, const void *textPtr, Point numer, Point denom, short *yMax, short *yMin, FixedPtr awArray, FixedPtr lsbArray, RectPtr boundsArray)
- TWOWORDINLINE(0x7008, 0xA854);
- extern pascal void SetPreserveGlyph(Boolean preserveGlyph)
- TWOWORDINLINE(0x700A, 0xA854);
- extern pascal Boolean GetPreserveGlyph(void)
- TWOWORDINLINE(0x700B, 0xA854);
- extern pascal OSErr FlushFonts(void)
- TWOWORDINLINE(0x700C, 0xA854);
- extern void getfnum(char *theName, short *familyID);
- extern void getfontname(short familyID, char *theName);
- extern pascal short GetDefFontSize(void)
- FIVEWORDINLINE(0x3EB8, 0x0BA8, 0x6604, 0x3EBC, 0x000C);
- #if USESCODEFRAGMENTS
- extern pascal short GetSysFont(void);
- extern pascal short GetAppFont(void);
- #else
- #define GetSysFont() (* (short*) 0x0BA6)
-
- #define GetAppFont() (* (short*) 0x0984)
-
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-
-